#ifndef SABY_LEXICAL_ANALYZE_H
#define SABY_LEXICAL_ANALYZE_H

#include "LexElement.h"
#include "CodeStream.h"

class LexicalAnalyze
{
public:
	LexicalAnalyze();

	bool analyze(const std::string& src);
	void clear();

	bool is_integrity();
	std::string get_expect();
	LexEleVec& get_result();

	//Debug Function
	void print_result();

private:
	bool try_saveid(std::string& ctx, int line, int cols);

private:
	LexEleVec m_result;
	CodeStream m_cstr;
	std::string m_expect;
};


#endif